<?php

namespace app\admin\controller;

use think\facade\Session;
use app\admin\model\Orders as OrdersM;
class Orders extends Base
{
    public function initialize()
    {
        if (Session::get('username') == '') {
            $this->error("请先登录", 'base/login');
        }
    }
    public function ordersList(){
        $list=OrdersM::with('goods')->order('order_id', 'desc')->paginate(10);
        $this->assign('list',$list);
        return $this->fetch();
    }
}